package com.nopay.dxdwphone.dialog;

import android.app.Dialog;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.nopay.dxdwphone.R;


/**
 * 呼叫转移模式
 */
public class DialogCallModel extends Dialog {

    private AppCompatActivity mActivity;

    public DialogCallModel(@NonNull AppCompatActivity context) {
        super(context, R.style.MyDialog);
        mActivity = context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_call_model);
        //按空白处不能取消动画
        setCanceledOnTouchOutside(true);
        findViewById(R.id.tv1).setOnClickListener(v -> {
            onClickEvent(1);
            dismiss();
        });
        findViewById(R.id.tv2).setOnClickListener(v -> {
            onClickEvent(2);
            dismiss();
        });

        findViewById(R.id.tv3).setOnClickListener(v -> {
            onClickEvent(3);
            dismiss();
        });

    }

    public void onClickEvent(int position) {

    }

}



